<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<script src="./vue.js"></script>

<body>
  <div id="app">
    <div v-bind:id="dataId | formatId">lin dai huang</div>
  </div>
  <script>
    const vm = new Vue({
      el: "#app",
      data: {
        dataId: "li wen tao",
      },
      filters: {
        formatId(value) {
          if (value !== undefined) {
            return value.charAt(1) +
              value.indexOf("i");
          } else {
            return "";
          }
        },
      }
    })
  </script>
</body>

</html>